package CSIRPSystem;


/**
 * Generated from IDL interface "CSIRP".
 *
 * @author JacORB IDL compiler V 2.3.0, 17-Feb-2007
 * @version generated at 2013-5-20 22:07:19
 */

public class _CSIRPStub
	extends org.omg.CORBA.portable.ObjectImpl
	implements CSIRPSystem.CSIRP
{
	private String[] ids = {"IDL:CSIRPSystem/CSIRP:1.0"};
	public String[] _ids()
	{
		return ids;
	}

	public final static java.lang.Class _opsClass = CSIRPSystem.CSIRPOperations.class;
	public CSIRPConstDefs.Result trigger_heartbeat(java.lang.String manager_identifier) throws CSIRPSystem.InvalidManagerIdentifier,CSIRPSystem.TriggerHeartbeat
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "trigger_heartbeat", true);
				_os.write_string(manager_identifier);
				_is = _invoke(_os);
				CSIRPConstDefs.Result _result = CSIRPConstDefs.ResultHelper.read(_is);
				return _result;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:CSIRPSystem/InvalidManagerIdentifier:1.0"))
				{
					throw CSIRPSystem.InvalidManagerIdentifierHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:CSIRPSystem/TriggerHeartbeat:1.0"))
				{
					throw CSIRPSystem.TriggerHeartbeatHelper.read(_ax.getInputStream());
				}
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "trigger_heartbeat", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			CSIRPOperations _localServant = (CSIRPOperations)_so.servant;
			CSIRPConstDefs.Result _result;
			try
			{
				_result = _localServant.trigger_heartbeat(manager_identifier);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}

		}

	}

	public java.lang.String[] get_cs_irp_versions() throws CSIRPSystem.GetCSIRPVersions
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "get_cs_irp_versions", true);
				_is = _invoke(_os);
				java.lang.String[] _result = ManagedGenericIRPConstDefs.VersionNumberSetHelper.read(_is);
				return _result;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:CSIRPSystem/GetCSIRPVersions:1.0"))
				{
					throw CSIRPSystem.GetCSIRPVersionsHelper.read(_ax.getInputStream());
				}
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "get_cs_irp_versions", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			CSIRPOperations _localServant = (CSIRPOperations)_so.servant;
			java.lang.String[] _result;
			try
			{
				_result = _localServant.get_cs_irp_versions();
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}

		}

	}

	public CSIRPConstDefs.Result set_heartbeat_period(short heartbeat_period) throws CSIRPSystem.InvalidHeartbeatPeriod,CSIRPSystem.ConflictingHeartbeatPeriod,ManagedGenericIRPSystem.OperationNotSupported,ManagedGenericIRPSystem.ValueNotSupported,CSIRPSystem.SetHeartbeatPeriod
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "set_heartbeat_period", true);
				_os.write_ushort(heartbeat_period);
				_is = _invoke(_os);
				CSIRPConstDefs.Result _result = CSIRPConstDefs.ResultHelper.read(_is);
				return _result;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:CSIRPSystem/InvalidHeartbeatPeriod:1.0"))
				{
					throw CSIRPSystem.InvalidHeartbeatPeriodHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:CSIRPSystem/ConflictingHeartbeatPeriod:1.0"))
				{
					throw CSIRPSystem.ConflictingHeartbeatPeriodHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:ManagedGenericIRPSystem/OperationNotSupported:1.0"))
				{
					throw ManagedGenericIRPSystem.OperationNotSupportedHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:ManagedGenericIRPSystem/ValueNotSupported:1.0"))
				{
					throw ManagedGenericIRPSystem.ValueNotSupportedHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:CSIRPSystem/SetHeartbeatPeriod:1.0"))
				{
					throw CSIRPSystem.SetHeartbeatPeriodHelper.read(_ax.getInputStream());
				}
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "set_heartbeat_period", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			CSIRPOperations _localServant = (CSIRPOperations)_so.servant;
			CSIRPConstDefs.Result _result;
			try
			{
				_result = _localServant.set_heartbeat_period(heartbeat_period);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}

		}

	}

	public CSIRPConstDefs.Result get_heartbeat_period(org.omg.CORBA.ShortHolder heartbeat_period) throws CSIRPSystem.GetHeartbeatPeriod
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "get_heartbeat_period", true);
				_is = _invoke(_os);
				CSIRPConstDefs.Result _result = CSIRPConstDefs.ResultHelper.read(_is);
				heartbeat_period.value = _is.read_ushort();
				return _result;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:CSIRPSystem/GetHeartbeatPeriod:1.0"))
				{
					throw CSIRPSystem.GetHeartbeatPeriodHelper.read(_ax.getInputStream());
				}
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "get_heartbeat_period", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			CSIRPOperations _localServant = (CSIRPOperations)_so.servant;
			CSIRPConstDefs.Result _result;
			try
			{
				_result = _localServant.get_heartbeat_period(heartbeat_period);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}

		}

	}

	public ManagedGenericIRPConstDefs.Method[] get_cs_irp_notification_profile(java.lang.String irp_version) throws ManagedGenericIRPSystem.InvalidParameter,ManagedGenericIRPSystem.OperationNotSupported,CSIRPSystem.GetCSIRPNotificationProfile
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "get_cs_irp_notification_profile", true);
				_os.write_string(irp_version);
				_is = _invoke(_os);
				ManagedGenericIRPConstDefs.Method[] _result = ManagedGenericIRPConstDefs.MethodListHelper.read(_is);
				return _result;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:ManagedGenericIRPSystem/InvalidParameter:1.0"))
				{
					throw ManagedGenericIRPSystem.InvalidParameterHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:ManagedGenericIRPSystem/OperationNotSupported:1.0"))
				{
					throw ManagedGenericIRPSystem.OperationNotSupportedHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:CSIRPSystem/GetCSIRPNotificationProfile:1.0"))
				{
					throw CSIRPSystem.GetCSIRPNotificationProfileHelper.read(_ax.getInputStream());
				}
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "get_cs_irp_notification_profile", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			CSIRPOperations _localServant = (CSIRPOperations)_so.servant;
			ManagedGenericIRPConstDefs.Method[] _result;
			try
			{
				_result = _localServant.get_cs_irp_notification_profile(irp_version);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}

		}

	}

	public ManagedGenericIRPConstDefs.Method[] get_cs_irp_operations_profile(java.lang.String irp_version) throws ManagedGenericIRPSystem.InvalidParameter,ManagedGenericIRPSystem.OperationNotSupported,CSIRPSystem.GetCSIRPOperationsProfile
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "get_cs_irp_operations_profile", true);
				_os.write_string(irp_version);
				_is = _invoke(_os);
				ManagedGenericIRPConstDefs.Method[] _result = ManagedGenericIRPConstDefs.MethodListHelper.read(_is);
				return _result;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:ManagedGenericIRPSystem/InvalidParameter:1.0"))
				{
					throw ManagedGenericIRPSystem.InvalidParameterHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:ManagedGenericIRPSystem/OperationNotSupported:1.0"))
				{
					throw ManagedGenericIRPSystem.OperationNotSupportedHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:CSIRPSystem/GetCSIRPOperationsProfile:1.0"))
				{
					throw CSIRPSystem.GetCSIRPOperationsProfileHelper.read(_ax.getInputStream());
				}
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "get_cs_irp_operations_profile", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			CSIRPOperations _localServant = (CSIRPOperations)_so.servant;
			ManagedGenericIRPConstDefs.Method[] _result;
			try
			{
				_result = _localServant.get_cs_irp_operations_profile(irp_version);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}

		}

	}

}
